<?php


namespace app\api\controller;


use app\api\model\Account;

class Test
{
    /*
     * 从URL中接收 no name gender 三个字段 写入数据库 实现通过URL动态添加数据
     *
     */
    public function add()
    {
        $no = input('get.no');
        $name = input('get.name');
        $gender = input('get.gender');
        $data = array();
        $data['account_no'] = $no;
        $data['account_name'] = $name;
        $data['account_gender'] = $gender;
        $data['add_time'] = time();
        $a = new Account();
        return $a->insert($data);
    }
}
